package com.cragon.observer;

/**
 * @Description: TODO
 * @Author: ZHOUHAILONG
 * @Date: 2020年07月31日 10:09
 */
public class ObserverDemo {
	public static void main(String[] args) {
		BeWatched beWatched = new BeWatched();
		Watcher watcher = new Watcher();
		Watcher2 watcher2 = new Watcher2();
		beWatched.addObserver(watcher);
		beWatched.addObserver(watcher2);
		beWatched.counter(10);
	}
}
